
<%@ page import="cn.gudian.cms.sms.SmsClient; cn.gudian.cms.Message.SmsRecord" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <title><g:message code="smsRecord.list" default="SmsRecord List" /></title>
       <script language="javascript" src="/js/list-min.js"></script>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a href="/sms/send">发短信</a></span>
            <span class="menuButton"><a href="/smsRecord/list">短信记录</a></span>
             <span class="menuButton"><a href="/sms/pressure">短信充值</a></span>
        </div>
        <div class="body">
            <h1><g:message code="smsRecord.list" default="SmsRecord List" /></h1>
            <g:if test="${flash.message}">
            <div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}" /></div>
            </g:if>
            <g:form action="deleteAll" name="listForm" method="post">
            <input type="hidden" name="qstr" id="qstr">
            <div class="list">
                <table>
                    <thead>
                        <tr>
                           <th width="30"><g:message code="chose" default="Chose" /></th>
                        
                   	    <g:sortableColumn property="id" title="Id" titleKey="smsRecord.id" />
                        
                   	    <g:sortableColumn property="mobile" title="Mobile" titleKey="smsRecord.mobile" />
                        
                   	    <g:sortableColumn property="content" title="Content" titleKey="smsRecord.content" />
                        
                   	    <g:sortableColumn property="sendTime" title="Send Time" titleKey="smsRecord.sendTime" />
                        
                   	    <g:sortableColumn property="planTime" title="Plan Time" titleKey="smsRecord.planTime" />
                        
                   	    <g:sortableColumn property="state" title="State" titleKey="smsRecord.state" />
                        
                      
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${smsRecordInstanceList}" status="i" var="smsRecordInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                            <td><input name="listId" type="checkbox" id="listId" value="${smsRecordInstance.id}"/></td>
                            <td><g:link action="show" id="${smsRecordInstance.id}">${fieldValue(bean: smsRecordInstance, field: "id")}</g:link></td>
                        
                            <td>${fieldValue(bean: smsRecordInstance, field: "mobile")}</td>
                        
                            <td>${fieldValue(bean: smsRecordInstance, field: "content")}</td>
                        
                            <td><g:formatDate date="${smsRecordInstance.sendTime}" /></td>
                        
                            <td><g:formatDate date="${smsRecordInstance.planTime}" /></td>
                        
                            <td>${SmsClient.returnInfo(smsRecordInstance?.state)}</td>
                        

                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
               </g:form>
            <div class="paginateButtons">
                 <a href="javascript:selAll()"><g:message code="allChose" default="allChose"/></a> <a href="javascript:noSelAll()"><g:message code="cancel" default="Cancel"/></a><a href="javascript:delArc(0)">&nbsp;<g:message code="delete" default="Delete"/>&nbsp;</a>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<g:paginate total="${smsRecordInstanceTotal}" />
            </div>
        </div>
    </body>
</html>
